<template>
  <div class="loading">
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
  </div>
</template>

<script>
import { defineComponent } from "vue";

export default defineComponent({
  name: "MyLoading",
  setup() {
    return {};
  }
});
</script>

<style scoped>
.loading {
  width: 80px;
  height: 100vh;
  margin: 0px auto;

}

.loading span {
  display: inline-block;
  width: 8px;
  height: 40px;
  border-radius: 4px;
  background: lightgreen;
  -webkit-animation: load 1s ease infinite;
  position: relative;
  top:50%;
}

@-webkit-keyframes load {
  0%, 100% {
    height: 40px;
    background: lightgreen;
  }
  50% {
    height: 70px;
    margin: -20px 0;
    background: lightblue;
  }
}

.loading span:nth-child(2) {
  -webkit-animation-delay: 0.2s;
}

.loading span:nth-child(3) {
  -webkit-animation-delay: 0.4s;
}

.loading span:nth-child(4) {
  -webkit-animation-delay: 0.6s;
}

.loading span:nth-child(5) {
  -webkit-animation-delay: 0.8s;
}
</style>